
<!DOCTYPE html>
<html>
  <head>
    
<meta charset="utf-8" >

<title>ROS中nav_msgs消息 | Blog</title>
<meta name="description" content="个人生活，学习记录">

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.0/animate.min.css">

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link rel="shortcut icon" href="https://qiaoxu123.github.io/favicon.ico?v=1589072669553">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css">
<link rel="stylesheet" href="https://qiaoxu123.github.io/styles/main.css">



<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>



  </head>
  <body>
    <div id="app" class="main">
      <div class="site-header-container">
  <div class="site-header">
    <div class="left">
      <a href="https://qiaoxu123.github.io">
        <img class="avatar" src="https://qiaoxu123.github.io/images/avatar.png?v=1589072669553" alt="" width="32px" height="32px">
      </a>
      <a href="https://qiaoxu123.github.io">
        <h1 class="site-title">Blog</h1>
      </a>
    </div>
    <div class="right">
      <transition name="fade">
        <i class="icon" :class="{ 'icon-close-outline': menuVisible, 'icon-menu-outline': !menuVisible }" @click="menuVisible = !menuVisible"></i>
      </transition>
    </div>
  </div>
</div>

<transition name="fade">
  <div class="menu-container" style="display: none;" v-show="menuVisible">
    <div class="menu-list">
      
        
          <a href="https://qiaoxu123.github.io" class="menu purple-link">
            首页
          </a>
        
      
        
          <a href="https://qiaoxu123.github.io/archives" class="menu purple-link">
            归档
          </a>
        
      
        
          <a href="https://qiaoxu123.github.io/tags" class="menu purple-link">
            标签
          </a>
        
      
    </div>
  </div>
</transition>


      <div class="content-container">
        <div class="post-detail">
          
          <h2 class="post-title">ROS中nav_msgs消息</h2>
          <div class="post-info post-detail-info">
            <span><i class="icon-calendar-outline"></i> 2019-09-26</span>
            
              <span>
                <i class="icon-pricetags-outline"></i>
                
                  <a href="https://qiaoxu123.github.io/tag/5HFkONYVv/">
                    ROS
                    
                      ，
                    
                  </a>
                
                  <a href="https://qiaoxu123.github.io/tag/N-5DhIgGPS/">
                    仿真
                    
                      ，
                    
                  </a>
                
                  <a href="https://qiaoxu123.github.io/tag/BqCd0A5YE/">
                    转载
                    
                  </a>
                
              </span>
            
          </div>
          <div class="post-content">
            <p>最近在对ROS的深度使用中，发现<code>nav_msgs</code>消息在包通信中出现频率超高。在这特地转载记录补充下，方便以后查找巩固。<br>
<a href="https://blog.csdn.net/ji0525084/article/details/14125119">参考博客</a></p>
<!-- more -->
<h3 id="一-消息类型">一、消息类型</h3>
<ol>
<li><code>GridCells</code> 栅格单元</li>
</ol>
<ul>
<li><code>std_msgs/Header header</code> 时间戳与坐标系</li>
<li><code>float32 cell_width，float32 cell_height</code>  宽度与高度</li>
<li><code>geometry_msgs/Point[] cells</code> 数组</li>
</ul>
<p>通过该消息类型，对场景地图进行表征</p>
<hr>
<ol start="2">
<li>MapMetaData 占有率栅格地图数据</li>
</ol>
<ul>
<li><code>time map_load_time</code> 地图被加载的时间</li>
<li><code>float32 resolution</code> 分辨率（m/cell）</li>
<li><code>uint32 width，uint32 height</code></li>
<li><code>geometry_msgs/Pose origin</code> 真实世界中的原点 (m,m,rad) 图像中的(0,0)点</li>
</ul>
<hr>
<ol start="3">
<li><code>OccupancyGrid</code> 2d栅格地图</li>
</ol>
<ul>
<li><code>Header header</code></li>
<li><code>nav_msgs/MapMetaData info</code> 地图信息</li>
<li><code>int8[] data</code> 占有率地图数据序列，概率为【0-100】，未知为-1</li>
</ul>
<hr>
<ol start="4">
<li><code>Odometry</code> 估计的位姿与速度</li>
</ol>
<ul>
<li><code>std_msgs/Header header</code> 位姿所在坐标系</li>
<li><code>string child_frame_id</code> 速度所在坐标系</li>
<li><code>geometry_msgs/PoseWithCovariance pose</code> 位姿</li>
<li><code>geometry_msgs/TwistWithCovariance twist</code> 速度</li>
</ul>
<hr>
<ol start="5">
<li><code>Path</code> 路径</li>
</ol>
<ul>
<li><code>Header header</code></li>
<li><code>geometry_msgs/PoseStamped[] poses</code> 代表路径的三维点坐标数组</li>
</ul>
<hr>
<h3 id="二-服务">二、服务</h3>
<ol>
<li><code>GetMap.srv</code> 接收地图</li>
</ol>
<ul>
<li>不发送数据<br>
接受</li>
<li><code>nav_msgs/OccupancyGrid map</code></li>
</ul>
<ol>
<li><code>GetPlan.srv</code> 规划当前位置到目标位置的路径<br>
发送</li>
</ol>
<ul>
<li><code>geometry_msgs/PoseStamped start</code> 起始点</li>
<li><code>geometry_msgs/PoseStamped goal</code> 目标点</li>
<li><code>float32 tolerance</code> 如果不能到达目标，最近可到的约束<br>
接受</li>
<li><code>nav_msgs/Path plan</code> 路径</li>
</ul>

          </div>
        </div>

        
          <div class="next-post">
            <a class="purple-link" href="https://qiaoxu123.github.io/post/ros-note1-rviz/">
              <h3 class="post-title">
                下一篇：ROS仿真实现1--使用rviz显示小车
              </h3>
            </a>
          </div>
          
      </div>

      

      <div class="site-footer">
  <div class="slogan">个人生活，学习记录</div>
  <div class="social-container">
    
      
    
      
    
      
    
      
    
      
    
  </div>
  Powered by <a href="https://github.com/getgridea/gridea" target="_blank">Gridea</a> | <a class="rss" href="https://qiaoxu123.github.io/atom.xml" target="_blank">RSS</a>
</div>


    </div>
    <script type="application/javascript">

hljs.initHighlightingOnLoad()

var app = new Vue({
  el: '#app',
  data: {
    menuVisible: false,
  },
})

</script>




  </body>
</html>
